package com.lzj.demo.design.decorator;

import lombok.extern.slf4j.Slf4j;
/**
 * 使用装饰者模式实现sso单点登录的测试类
 * */
@Slf4j
public class Test {
    public static void main(String[] args) throws Exception {
        LoginSsoDecorator loginSsoDecorator = new LoginSsoDecorator(new SsoInterceptor());
        boolean success = loginSsoDecorator.preHandler("1001","success");
        log.info("登录校验结果:{}" ,success ? "放行":"拦截");
    }
}
